package com.feizhaiyou.demo.service.impl;

import com.feizhaiyou.demo.anno.DataSource;
import com.feizhaiyou.demo.dao.DataSource3Mapper;
import com.feizhaiyou.demo.enums.DataSourceType;
import com.feizhaiyou.demo.service.DataSource3Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

/**
 * @author Jason
 */
@Service
@DataSource(value = DataSourceType.SLAVE2)
public class DataSource3ServiceImpl implements DataSource3Service {
    @Autowired
    private DataSource3Mapper dataSource3Mapper;
    @Override
    public List<HashMap> getData() {
        return dataSource3Mapper.getData();
    }
}
